The present invention generally relates to the field of storage systems, and particularly to a method and system for recombining unused capacity for use in expanding volume capacity on a storage device.
The storage of electronic data is one of the most important and pervasive aspects of modern life. Everything from bank account information to personal data and work product may be stored on storage devices, such as hard disks, disk arrays such as RAID arrays, and the like. Thus, the efficient access and use of data is of utmost importance.
An important aspect of data storage is the expansion of a volume of data on a storage device. A volume of data may be stored on a storage device to include data of a particular type, data from a particular source, user-defined segment of data, and the like. In certain instances, it is desirable to expand capacity of the volume to enable the volume to store additional data. However, previous methods utilized to increase volume size may involve rearranging the order of the volumes on the storage device. This may be undesirable for a number of reasons. For example, volumes may be located in a specific order on a storage device in order to take advantage of faster access times of the device. Therefore, volumes requiring more frequent access and/or greater access amounts may be positioned for faster access times and transfer over volumes with lower access needs. Additionally, previous methods may require increased volume movement and data movement, thereby requiring a greater period of time to perform the volume expansion as well as greater system resources.
Therefore, it would be desirable to provide an improved method and system for volume expansion on a storage device.
Accordingly, the present invention is directed to a method and system for expanding volume capacity. In a first aspect of the present invention, a method of expanding volume capacity on a storage device includes receiving a request to expand capacity of a target volume by a requested amount. A first hierarchy is queried for unused capacity, wherein if unused capacity is at least one of greater than or equal to the requested amount, the unused capacity is positioned within the target volume. If unused capacity is less than the requested amount, at least one successive hierarchy located at a logic block address further from a target volume logic block address than a first hierarchy logic block address is queried to locate unused capacity, which is at least one of greater than or equal to the requested amount. The unused capacity is then positioned to be included with the target volume.
In a second aspect of the present invention, a method of expanding volume capacity on a storage device includes receiving a request to expand capacity of a target volume having an initial capacity by a requested amount. The unused capacity of the storage device is determined and the target volume located. Successive hierarchies are queried for unused capacity, wherein a first hierarchy is queried before a second hierarchy. The first hierarchy is located at a logic block address closer to the target volume than the second hierarchy. Unused capacity is located, the unused capacity at least one greater than and equal to the requested amount. The unused capacity is positioned with the target volume to arrive at a target volume generally having the initial capacity and the requested amount.
In a third aspect of the present invention, a method of expanding volume capacity on a storage device includes receiving a request to expand capacity of a target volume having an initial capacity by a requested amount. Unused capacity of the storage device is determined. Successive hierarchies surrounding the target volume are queried for unused capacity, wherein a first hierarchy is queried before a second hierarchy, the first hierarchy located at a logic block address closer to the target volume than the second hierarchy, until unused capacity at least one greater than and equal to the requested amount is located. The unused capacity is then positioned to be included with the target volume.